package cn.zhf.shop.controller;



import cn.zhf.shop.entity.Audit;
import cn.zhf.shop.entity.Message;
import cn.zhf.shop.service.AccountDealService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;


@RestController
@RequestMapping("/api/accountdeal")
@Api(tags = "交易对账模块")
public class AccountdealController{
    /**
     * 服务对象
     */
    @Resource
    private AccountDealService accountDealService;

    @ApiOperation(value = "获取所有")
    @GetMapping("/all")
    public Message selectAll() { return accountDealService.selectAll(); }

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @ApiOperation(value = "根据id获取")
    @GetMapping("{id}")
    public Message selectOne(int id) {
        return accountDealService.selectByPrimaryKey(id);
    }

    @ApiOperation(value = "根据交易对账头部id获取")
    @GetMapping("/selectAllById")
    public Message selectAllById(String id) {
        return accountDealService.selectAllByAccountAccountDealTitleId(id);
    }

    @ApiOperation(value = "根据订单id获取")
    @GetMapping("/selectByMerorderno")
    public Message selectByMerorderno(String id) {
        return accountDealService.selectByMerorderno(id);
    }




}